package com.irdstudio.efp.e4a.service.dao;

import java.util.List;

import com.irdstudio.efp.e4a.service.domain.SRuleColl;
import com.irdstudio.efp.e4a.service.vo.SRuleCollVO;
import com.irdstudio.basic.framework.core.base.DataOptionalAuthorityDao;

/**
 * <p>
 * DAO interface:系统规则集表
 * <p>
 * 
 * @author common
 * @date 2018-05-03
 */
public interface SRuleCollDao extends DataOptionalAuthorityDao {

	public int insertSRuleColl(SRuleColl sRuleColl);

	public int deleteByPk(SRuleColl sRuleColl);

	public int updateByPk(SRuleColl sRuleColl);

	public SRuleColl queryByPk(SRuleColl sRuleColl);

	public List<SRuleColl> queryAllOwnerByPage(SRuleColl sRuleColl);

	public List<SRuleColl> queryAllCurrOrgByPage(SRuleColl sRuleColl);

	public List<SRuleColl> queryAllCurrDownOrgByPage(SRuleColl sRuleColl);

	/**
	 * 提交规则集
	 * 
	 * @param sRuleColl
	 * @return
	 */
	public int submitSRuleColl(SRuleColl sRuleColl);

	/**
	 * 失效规则集
	 * 
	 * @param sRuleColl
	 * @return
	 */
	public int disableSRuleColl(SRuleColl sRuleColl);

	/**
	 * 查询当前规则集类型是否存在了生效的省级配置
	 * 
	 * @param sRuleCollVO
	 * @return
	 */
	public int queryRuleTypeIsProvince(SRuleCollVO sRuleCollVO);

	/**
	 * 根据规则类型和法人机构码查询生效的规则集
	 * 
	 * @param sRuleCollVO
	 * @return
	 */
	public List<SRuleColl> queryRuleCollByTypeLegal(SRuleCollVO sRuleCollVO);

	/**
	 * 根据规则集类型查询生效的省级规则集
	 * 
	 * @param sRuleCollVO
	 * @return
	 */
	public List<SRuleColl> queryProvinceRuleCollByType(SRuleCollVO sRuleCollVO);

}